/*
 * GStandingsSortCriteria.java
 * Created on 28 déc. 2007
 *
 * Glacéo Internet Platform
 * http://sourceforge.net/projects/chm/
 *
 * Copyright (c) 2005-2007, Jan Janke (VirtualHockey Project)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.hockeo.vhbase.data.helper;

import com.hockeo.vhbase.data.dao.standings.GArchivedStandings;
import com.hockeo.vhbase.data.dao.standings.GStandings;

/**
 * Defines the different criteria that are supported when sorting {@link GStandings} objects.
 *
 * @version $Id$
 * @author jjanke
 */
public enum GStandingsSortCriteria
{
  /**
   * Sorts the standings by the number of played seasons (descending, only applicable
   * to {@link GArchivedStandings} with the type {@link GArchivedStandingsType#ETERNAL}).
   */
  BY_SEASONS,

  /**
   * Sorts the standings by the number of played matches (descending).
   */
  BY_MATCHES,

  /**
   * Sorts the standings according to their rank (ascending).
   */
  BY_RANK,

  /**
   * Sorts the standings according to their cross-element rank (ascending).
   */
  BY_CROSS_ELEMENT_RANK,

  /**
   * Sorts the standings according to the following criteria:
   * 1. By points (descending)
   * 2. By higher number of victories.
   * 3. By higher number of shootout victories.
   * 4. By goals difference (descending).
   * 5. By higher number of scored goals.
   * 6. By higher amount of remaining goals.
   *
   * This is the official sorting which is used to establish a ranking.
   */
  BY_POINTS,

  /**
   * Sorts by wins (descending).
   */
  BY_WINS,

  /**
   * Sorts by wins after shootout (descending).
   */
  BY_WINS_SHOOTOUT,

  /**
   * Sorts by losses after shootout (descending).
   */
  BY_LOSSES_SHOOTOUT,

  /**
   * Sorts by losses (descending).
   */
  BY_LOSSES,

  /**
   * Sorts by scored goals (descending).
   */
  BY_GOALS_FOR,

  /**
   * Sorts by goals scored by the opponents (descending).
   */
  BY_GOALS_AGAINST,

  /**
   * Sorts by goals difference (descending).
   */
  BY_GOALS_DIFF,

  /**
   * Sorts by goals still remaining on the goals account (descending).
   */
  BY_REMAINING_GOALS,

  /**
   * Sorts by the average number of points (descending).
   */
  BY_POINTS_AVG,

  /**
   * Sorts by the percentage of points reached (descending).
   */
  BY_POINTS_PCT,

  /**
   * Orders the standings from multiple elements according to the following criteria:
   * 1) by rank type (PROMOTED_1, PROMOTED_2, MIDFIELD, RELEGATED)
   * 2) by all the criteria as stated by {@link #BY_POINTS}
   */
  FOR_MULTIPLE_ELEMENTS;
}
